import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
import Main from '@/views/Main.vue'
import Login from '@/views/Login.vue'
import Register from '@/views/Register.vue'
import ArtCate from '@/views/Article/ArtCate.vue'
import ArtList from '@/views/Article/ArtList.vue'
import Home from '@/views/Home/home.vue'
import UserAvatar from '@/views/User/UserAvatar.vue'
import UserInfo from '@/views/User/UserInfo.vue'
import UserPwd from '@/views/User/UserPwd.vue'

const routes = [
  {
    path: '/',
    name: 'login',
    component: Login
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/register',
    name: 'register',
    component: Register
  },
  {
    path: '/main',
    name: 'main',
    component: Main
  },
  {
    path: '/art-cate',
    name: 'art-cate',
    component: ArtCate
  },
  {
    path: '/art-list',
    name: 'art-list',
    component: ArtList
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/user-avatar',
    name: 'user-avatar',
    component: UserAvatar
  },
  {
    path: '/user-info',
    name: 'user-info',
    component: UserInfo
  },
  {
    path: '/user-pwd',
    name: 'user-pwd',
    component: UserPwd
  },
]

const router = new VueRouter({
  routes
})

export default router
